package Java_test2;

import Test_3.Olddriver.OldDriver;

public class Olddriver {
    String name;
    public void drive(Car c){
        System.out.println(name+"开的玛莎拉蒂有"+c.pailiang+"排量"+c.zuowshu+"个座位");
    }
    public void driver(Lunchuan l){
        System.out.println(name+"开的珍珠号有"+l.hangsu+"航速"+l.paishui+"排水量"+l.load+"载重");
    }
    public  void driver(Plane p){
        System.out.println(name+"开的飞机有"+p.zuowshu+"座位,现在飞行高度"+p.high);
    }
    public void driver(Tank t){
        System.out.println(name+"开的坦克具有"+t.dantoushu+"个弹头和"+t.horsepower+"马力");
    }
    public void driver(Tuolaji t){
        System.out.println(name+"开的拖拉机有"+t.tiji+"体积"+t.load+"载重");
    }
}
